package com.ruoyi.gas.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gas.mapper.GasDriverInfoMapper;
import com.ruoyi.gas.domain.GasDriverInfo;
import com.ruoyi.gas.service.IGasDriverInfoService;

/**
 * 司机信息
Service业务层处理
 * 
 * @author morris
 * @date 2023-12-08
 */
@Service
public class GasDriverInfoServiceImpl implements IGasDriverInfoService 
{
    @Autowired
    private GasDriverInfoMapper gasDriverInfoMapper;

    /**
     * 查询司机信息

     * 
     * @param driverId 司机信息
主键
     * @return 司机信息

     */
    @Override
    public GasDriverInfo selectGasDriverInfoByDriverId(Long driverId)
    {
        return gasDriverInfoMapper.selectGasDriverInfoByDriverId(driverId);
    }

    /**
     * 查询司机信息
列表
     * 
     * @param gasDriverInfo 司机信息

     * @return 司机信息

     */
    @Override
    public List<GasDriverInfo> selectGasDriverInfoList(GasDriverInfo gasDriverInfo)
    {
        return gasDriverInfoMapper.selectGasDriverInfoList(gasDriverInfo);
    }

    /**
     * 新增司机信息

     * 
     * @param gasDriverInfo 司机信息

     * @return 结果
     */
    @Override
    public int insertGasDriverInfo(GasDriverInfo gasDriverInfo)
    {
        gasDriverInfo.setCreateTime(DateUtils.getNowDate());
        return gasDriverInfoMapper.insertGasDriverInfo(gasDriverInfo);
    }

    /**
     * 修改司机信息

     * 
     * @param gasDriverInfo 司机信息

     * @return 结果
     */
    @Override
    public int updateGasDriverInfo(GasDriverInfo gasDriverInfo)
    {
        gasDriverInfo.setUpdateTime(DateUtils.getNowDate());
        return gasDriverInfoMapper.updateGasDriverInfo(gasDriverInfo);
    }

    /**
     * 批量删除司机信息

     * 
     * @param driverIds 需要删除的司机信息
主键
     * @return 结果
     */
    @Override
    public int deleteGasDriverInfoByDriverIds(Long[] driverIds)
    {
        return gasDriverInfoMapper.deleteGasDriverInfoByDriverIds(driverIds);
    }

    /**
     * 删除司机信息
信息
     * 
     * @param driverId 司机信息
主键
     * @return 结果
     */
    @Override
    public int deleteGasDriverInfoByDriverId(Long driverId)
    {
        return gasDriverInfoMapper.deleteGasDriverInfoByDriverId(driverId);
    }
}
